<?php
/**
 * Description of Base.php.
 *
 * @package Real\App
 * @author zhenhao<hit_zhenhao@163.com>
 */
namespace Real\App;

class Base
{
    private $twig;

    public function __construct()
    {
        $this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem([
            '__main__' => dirname(__DIR__) . '/View'
        ]));
    }

    public function render($name, $context = [])
    {
        return $this->twig->render($name, $context);
    }
}